Utilizing translation tables for testing processors

ABSTRACT

A method, apparatus and a product for utilizing translation tables for testing processors. The method is used for testing a target processor that utilizes different translation tables to translate virtual addresses to physical addresses. The method comprises obtaining a test template that comprises directives to be executed in different contexts, during each of which a different translation table is utilized to translate virtual addresses to physical addresses. The translation tables to be used by the target processor in the different contexts are determined, so that the translation tables overlap, at least in part.

TECHNICAL FIELD

The present disclosure relates to quality assurance in general, and toverification of operation of processors while utilizing differenttranslation tables, in particular.

BACKGROUND

Computerized devices control almost every aspect of our life—fromwriting documents to controlling traffic lights. However, computerizeddevices are bug-prone, and thus require a testing phase in which thebugs should be discovered. The testing phase, also referred to asverification phase, is considered one of the most difficult tasks indesigning a computerized device. The cost of a bug may be enormous, asits consequences may be disastrous. For example, a bug may cause theinjury of a person relying on the designated functionality of thecomputerized device. Additionally, a bug in hardware or firmware may beexpensive to fix, as patching it requires call-back of the computerizeddevice. Hence, many developers of computerized devices invest asignificant portion, such as 70%, of the development cycle to discovererroneous functionalities of the computerized device.

BRIEF SUMMARY

One exemplary embodiment of the disclosed subject matter is a methodcomprising: obtaining a test template, wherein the test template isutilized for testing a target processor, wherein the test templatecomprises one or more directives, at least one of which represents aplurality of alternative sets of one or more instructions executable bythe target processor, wherein the target processor is configured toutilize a different translation table to translate a virtual address toa physical address in different contexts, wherein the test templatecomprises: a first set of directives to be executed in a first context;a second set of directives to be executed in a second context; based onthe test template, generating a modified test template, wherein saidgenerating comprises: determining a first translation table to be usedin the first context by the target processor, wherein the firsttranslation table comprises a mapping of a first set of virtualaddresses to a first set of physical addresses, whereby during executionof instructions generated based on the first set of directives, memoryaddress translations are handled using the first translation table;determining a second translation table to be used in the second contextby the target processor, wherein the second translation table comprisesa mapping of a second set of virtual addresses to a second set ofphysical addresses, whereby during execution of instructions generatedbased on the second set of directives, memory address translations arehandled using the second translation table, wherein the firsttranslation table and the second translation table overlap.

Another exemplary embodiment of the disclosed subject matter is acomputer program product comprising a non-transitory computer readablestorage medium retaining program instructions, which programinstructions when read by a processor, cause the processor to perform:obtaining a test template, wherein the test template is utilized fortesting a target processor, wherein the test template comprises one ormore directives, at least one of which represents a plurality ofalternative sets of one or more instructions executable by the targetprocessor, wherein the target processor is configured to utilize adifferent translation table to translate a virtual address to a physicaladdress in different contexts, wherein the test template comprises: afirst set of directives to be executed in a first context; a second setof directives to be executed in a second context; based on the testtemplate, generating a modified test template, wherein said generatingcomprises: determining a first translation table to be used in the firstcontext by the target processor, wherein the first translation tablecomprises a mapping of a first set of virtual addresses to a first setof physical addresses, whereby during execution of instructionsgenerated based on the first set of directives, memory addresstranslations are handled using the first translation table; determininga second translation table to be used in the second context by thetarget processor, wherein the second translation table comprises amapping of a second set of virtual addresses to a second set of physicaladdresses, whereby during execution of instructions generated based onthe second set of directives, memory address translations are handledusing the second translation table, wherein the first translation tableand the second translation table overlap.

Yet another exemplary embodiment of the disclosed subject matter is atarget processor that is adapted to perform the steps of: obtaining atest template, wherein the test template is utilized for testing thetarget processor, wherein the test template comprises one or moredirectives, at least one of which represents a plurality of alternativesets of one or more instructions executable by the target processor,wherein the target processor is configured to utilize a differenttranslation table to translate a virtual address to a physical addressin different contexts, wherein the test template comprises: a first setof directives to be executed in a first context; a second set ofdirectives to be executed in a second context; based on the testtemplate, generating a modified test template, wherein said generatingcomprises: determining a first translation table to be used in the firstcontext by the target processor, wherein the first translation tablecomprises a mapping of a first set of virtual addresses to a first setof physical addresses, whereby during execution of instructionsgenerated based on the first set of directives, memory addresstranslations are handled using the first translation table; determininga second translation table to be used in the second context by thetarget processor, wherein the second translation table comprises amapping of a second set of virtual addresses to a second set of physicaladdresses, whereby during execution of instructions generated based onthe second set of directives, memory address translations are handledusing the second translation table, wherein the first translation tableand the second translation table overlap.

THE BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The present disclosed subject matter will be understood and appreciatedmore fully from the following detailed description taken in conjunctionwith the drawings in which corresponding or like numerals or charactersindicate corresponding or like components. Unless indicated otherwise,the drawings provide exemplary embodiments or aspects of the disclosureand do not limit the scope of the disclosure. In the drawings:

FIG. 1A shows a flowchart diagram of a method, in accordance with someexemplary embodiments of the disclosed subject matter;

FIG. 1B shows a flowchart diagram of a method, in accordance with someexemplary embodiments of the disclosed subject matter;

FIG. 2 shows a block diagram of an apparatus, in accordance with someexemplary embodiments of the disclosed subject matter;

FIG. 3A illustrates two mappings from a set virtual addresses to a setof physical addresses, in accordance with some exemplary embodiments ofthe disclosed subject matter;

FIGS. 3B and 3C illustrate translation tables, in accordance with someexemplary embodiments of the disclosed subject matter; and

FIG. 4 shows a schematic illustration of an exemplary environment andarchitecture in which the disclosed subject matter may be utilized, inaccordance with some exemplary embodiments of the disclosed subjectmatter.

DETAILED DESCRIPTION

One technical problem dealt with by the disclosed subject matter is toverify a target processor. The target processor may be ageneral-purposes processor, a Central Processing Unit (CPU), anIntegrated Circuit (IC), or the like. More specifically, the technicalproblem may be to verify the target processor is exhibiting expected andcorrect behavior regarding context-switches and usages of the correcttranslation table when translating addresses.

In some exemplary embodiments, verifying a target processor may requiresimulation or execution of many test-cases, also referred to as tests.An engineer may define scenarios which should be verified. Each scenariomay be illustrated using a test template. A test template may comprisedirectives providing the outline of the scenario to be tested. Aplurality of alternative tests may be generated based on the same testtemplate, each of which may be a different implementations of thescenario defined by the engineer. For example, the tests may differ inthe actual instructions, operands, addresses, or the like. A testgenerator may generate the test based on the constraints defined by thetest template. In some exemplary embodiments, a directive in the testtemplate may define constraints, such as a type of instruction,constraint on the operands, constraint on the addresses used, or thelike. A test generated based on the test template may be executed by thetarget processor, to determine whether the processor functionscorrectly. In some cases, the test may be executed using a simulator ofthe design of the target processor, such as in case the target processoris not yet fabricated. Additionally or alternatively, the test may beexecuted on the target processor itself.

In some exemplary embodiments, a context change may refer to afunctionality of the target processor. The target processor may beconfigured to utilize different address translation tables in differentcontexts. For example, when attempting to access a virtual address in afirst context, a first translation table is utilized to determine thecorresponding physical address. However, if the same virtual address isaccessed in a second context, the processor may be configured to utilizea second translation table to determine the correct physical address inthat context.

In some exemplary embodiments, each context may be associated with adifferent translation table. The translation table may define a mappingof a set of virtual addresses to a set of physical addresses. Duringexecution of a process, whenever a memory is accessed using a virtualaddress, the virtual address may be translated into physical address.The memory may be accessed as part of a memory access instruction, e.g.,loading or storing information, as part of control flow operation, e.g.,based on the instruction pointed to by the address that is stored in theprogram counter (also referred to as an instruction pointer). Contextswitching of the target processor may be the process in which the targetprocessor changes the translation table that it utilizes for translatingvirtual addresses.

In some exemplary embodiments, different contexts may be utilized in atarget processor having different processing entities, such as amulti-core processor, a processor having several hardware threads, aSimultaneous Multithreading (SMT) processor, or the like. Eachprocessing entity may operate in a different context, and the targetprocessor may be required to utilize the correct translation table ineach context. As another example, a single processing entity may operatein different contexts intermittently. As an example, the singleprocessing entity may execute instructions of two software processes,where for each process, a different time slice is allocated. The singleprocessing entity of the target processor may be configured to pause theexecution of one process and to start or resume another process.Switching from executing one process to executing another may compriseperforming a context change.

In some exemplary embodiments, the disclosed subject matter may beutilized in pre-silicon verification. In pre-silicon verification, thetarget processor may not be available for operation, e.g., the targetprocessor may not yet be fabricated. In some exemplary embodiments,instead of executing the target processor itself, a simulator, anemulator or the like may be utilized to simulate the operation of thedesign of the target processor. In some exemplary embodiments, a testgenerator may generate tests based on test templates and provide suchtests to the simulator for execution. In some exemplary embodiments, theoutcome of the simulated execution may be examined to determine whetherthe design provides the desired functionality.

In some exemplary embodiments, the disclosed subject matter may beutilized in post silicon verification. In some exemplary embodiments,post silicon verification may be performed with respect to a fabricatedprocessor that is available. In some exemplary embodiments, during postsilicon verification, an executable may be loaded to the targetprocessor and used for testing the target processor. In some exemplaryembodiments, the executable may cause the target processor to generatethe tests, execute them and verify their outcome. In some exemplaryembodiments, the executable may be generated off-device, such as bycompiling and generating a binary that can be executed using theinstruction set of the target processor.

Another technical problem dealt with by the disclosed subject matter isto accelerate the verification process while executing extensive andthorough tests. Additionally or alternatively, preparing an operatingsystem for executing an executable may be a time consuming task. It maycomprise validating permissions, loading the content of the executableto memory, copying command line arguments to the stack, creating a setof virtual addresses, determining a translation table, or the like. Insome exemplary embodiments, it may be desired to test the operation ofcontext changes of the target processor without loading thereon afull-fledged Operating System (OS).

One technical solution is to obtain a template and generate a modifiedtest template. In some exemplary embodiments, the test template maycomprise a first set of directives and a second set of directives. Thefirst set of directives may be executed in a first context. Additionallyor alternatively, the second set of directives may be executed in asecond context. Additionally or alternatively, a first and a secondtranslation tables may be determined. Each translation table may definea different mapping from a set of virtual addresses to a set physicaladdress. Additionally or alternatively, each translation table may beutilized, respectively, in the first and second contexts, e.g. formemory access operations, for control flow operation, or the like. Insome exemplary embodiments, the target processor may be configured toutilize a first translation table in order to perform memory accessoperations while executing instructions that are based on the first setof directives. Additionally or alternatively, the target processor maybe configured to utilize the second translation table while executinginstructions that are based on the second set of directives.

In some exemplary embodiments, the first translation table and thesecond translation table may overlap. In some exemplary embodiments, dueto such overlapping, utilization of the wrong translation table mayexhibit an identifiable operation that can be monitored. When suchidentifiable operation occurs, it may be determined that the targetprocessor is exhibiting a bug. In some exemplary embodiments, theoverlap may be in a virtual address, e.g., the first set of virtualaddresses and the second set of virtual addresses may both comprise thesame virtual address, which may be mapped to different physicaladdresses. Additionally or alternatively, the overlap may be in aphysical address, e.g., the first set of physical addresses and thesecond set of physical addresses may both comprise a same physicaladdress that is mapped to different virtual addresses.

In some exemplary embodiments, the first translation table may be apermutation of the second translation table. As an example, FIGS. 3B and3C illustrates two mappings from an identical set of virtual address toan identical set of physical addresses, which are permutations of eachother. The first mapping maps Set of Virtual Addresses 320, representingVA₁, VA₂, VA₃, VA₄, to Set of Physical Addresses 321, representing PA₁,PA₄, PA₂, PA₃. Put differently, VA₁ is mapped to PA₁, VA₂ is mapped toPA₄, VA₃ is mapped to PA₂, VA₄ is mapped to PA₃. This may also bedenoted as {(VA₁, PA₁), (VA₂, PA₄), (VA₃, PA₂), (VA₄, PA₃)}. The secondmapping maps the same Set of Virtual Addresses 320 to Set of PhysicalAddresses 322, which include the same physical addresses but in adifferent order. Specifically, as is exhibited in FIG. 3C, the secondmapping is {(VA₁, PA₂), (VA₂, PA₁), (VA₃, PA₃), (VA₄, PA₄)}. As can beappreciated, each virtual address is mapped to a different physicaladdress in the second mapping, and each physical address is likewisemapped to a different physical address in the second mapping.

In some exemplary embodiments, the modified test template may alreadytake into account the different translation tables. In some exemplaryembodiments, the modified test template may include directives relatingto the translation tables, to utilization of addresses of the virtualtranslation tables, or the like. It is noted that in some embodimentsthe disclosed subject matter may be employed to generate tests directlywithout providing an intermediate, modifies test template. However, thisis equivalent to modifying the test template and generating tests basedthereon. Depending on how the tests are generated, different embodimentsmay be implemented. For example, in pre-silicon verification, tests maybe generated directly from the test template, as the tests may begenerated on the same platform that is tasked with modifying the testtemplate to take into account context-related information. As anotherexample, in post-silicon verification, the template may be modifiedoff-platform and the modified template may be incorporated into theexecutable that is loaded onto the target processor. In yet anotherexample, in post-silicon verification, the original template may beincorporated as is into the executable, and the executable may be, whenexecuted by the target processor, generate the tests while taking intoaccount context-related information.

In some exemplary embodiments, the designer of the test template mayprovide directives indicating information regarding the context. As anexample, a number of contexts directive may be utilized to define anumber of translation tables to be created and used. Additionally oralternatively, a size of translation table directive may be utilized todefine a number of virtual addresses or a number of physical addressesto be included in each translation table, or the like.

In some exemplary embodiments, creation of test templates may beperformed in advance, such as before loading an executable onto thetarget processor in post-silicon verification. The translation tablesmay then be utilized by tests implementing context change test scenario.In some exemplary embodiments, the disclosed subject matter provides forscenarios for efficiently verifying the Memory Management Unit (MMU) ofthe target processor using context change.

In some exemplary embodiments, the usage of the same array of virtualaddresses that are mapped to a different set of physical addressesenables users to freely and quickly switch between contexts during testexecution, and by that stress the MMU and its underlyingmicro-architecture structures.

One technical effect of utilizing the disclosed subject matter is toprovide high-quality verification of a target processor. The disclosedsubject matter may be utilized to ensure that context change operationsperformed by a target processor are tested. By utilizing an overlappingtranslation tables, bugs in context change performed by the targetprocessor may be discovered.

In some exemplary embodiments, such verification may test the MMU of thetarget processor, the operation of the cache mechanism of the targetprocessor, or the like. In some exemplary embodiments, the disclosedsubject matter may be useful for testing and verifying correctness ofthe operation of the Translation Lookup Buffer (TLB) of the MMU of thetarget processor. In some exemplary embodiments, the TLB may be a cachethat is used to reduce the time taken to access a user memory location,such as by caching recent address translation outcomes. In someexemplary embodiments, the TLB may store the recent translations ofvirtual memory to physical memory and may function as anaddress-translation cache. A TLB may reside between the CPU and the CPUcache, between CPU cache and the main memory or between the differentlevels of the multi-level cache. It is noted that TLB may be present inany processor that utilizes paged or segmented virtual memory.

Another technical effect of utilizing the disclosed subject matter isthat the verification process of a context changing by the targetprocessor may be faster and more efficient verification process. Byutilizing the disclosed subject matter a small executable capable ofexecuting a large number of tests may be used in order to verify atarget processor. In some exemplary embodiments, tests generated basedon tests templates in accordance with the disclosed subject matter maytake advantage of the overlap between the translation tables to examineinconsistency in the operation of the target processor, and utilizationof the wrong translation table at different contexts.

In some exemplary embodiments, translation tables may be prepared inadvanced rather than in run time, enabling faster execution of tests andfaster generation of tests. In that embodiment, the size of the image ofthe executable may be larger compared to a dynamic preparation oftranslation tables.

The disclosed subject matter may provide for one or more technicalimprovements over any pre-existing technique and any technique that haspreviously become routine or conventional in the art.

Additional technical problem, solution and effects may be apparent to aperson of ordinary skill in the art in view of the present disclosure.

It is noted that the disclosed subject matter may be applicable withrespect to any address translations. For example, in some processorarchitectures, the processor may utilize effective addresses, which maybe translated into intermediate addresses, which in turn may betranslated into real addresses. The disclosed subject matter may beutilized to verify correct translation of effective addresses tointermediate addresses, intermediate addresses to physical addresses,and effective addresses to physical addresses, e.g., such as inprocessors that implement Effective to Real Address Translation (ERAT).Without loss of generality and for the clarity of the presentdisclosure, the disclosed subject matter is described in relation to avirtual address that is mapped to a physical address. The virtualaddress may be any address that is utilized (directly or indirectly) inan instruction to the processor which is mapped to a physical address.The physical address may be any address that is utilized (directly orindirectly) by the processor to access memory.

Referring now to FIG. 1A showing a flowchart diagram of a method, inaccordance with some exemplary embodiments of the disclosed subjectmatter.

On Step 110, a test template may be obtained. The test template maycomprise a set of directives. In some exemplary embodiments, the testtemplate may be defined by a verification engineer. The test templatemay define a scenario to be tested by the target processor. The testtemplate may introduce one or more degrees of freedom for defining aconcrete test that follows the scenario defined therein. In someexemplary embodiments, a directive may define constraints on thescenario. As an example, a directive may indicate that an instruction isto be created. The directive may indicate the type of instruction or mayprovide a set of types instructions from which the instruction is to beselected. The directive may indicate values, such as a constant value, avalue defined on other values (e.g., defined using variables), a rangeof values from which the value is selected, or the like. In someexemplary embodiments, the directive may be configured to be processedby a test generator, which may generate tests that implement thescenario defined therein.

In some exemplary embodiments, a test template in accordance with thedisclosed subject matter may define at least two portions of a test,each of which is to be executed in a different context. In each context,a different translation table may be utilized to translate virtualaddresses to physical addresses.

In some exemplary embodiments, the set of directives may comprise anumber of contexts directive. The number of contexts directive maydefine the number of translations tables that may be utilized for memoryaccess. In some exemplary embodiments, the directive may indicate to thetest generator, a number of tables to be defined, and at least some ofwhich (or all of which) will be utilized during the execution of thetest. Additionally or alternatively, the directive may indicate to atest template updating module to introduce into a modified test templatethe specific number of tables to be utilized by the generated tests,e.g., with concrete or symbolic values therein.

In some exemplary embodiments, the set of directives may comprise a sizeof translation table directive. The size of translation table directivemay define the number of virtual addresses that may be included intranslation table. Additionally or alternatively, the size oftranslation table directive may define the number of physical addressesto which the set virtual addresses is mapped to. In some exemplaryembodiments, a first directive may define the number of physicaladdresses, while a second directive may define the number of virtualaddresses. In some exemplary embodiments, the number of virtualaddresses may be lower or equal to the number of physical addressesutilized. In some exemplary embodiments, the size of translation tabledirective may indicate to a test generator or to another component thatallocates that translation tables, the size of each such translationtable, the number of addresses to be utilized in such translationtables, the number of virtual addresses, the number of physicaladdresses, or the like.

In some exemplary embodiments, the size of translation table directivemay indicate different sizes of translation tables, for differentcontexts. For example, if there the test template defines that there arefour contexts, the size of each of the four translation tables may ormay not be different, and explicitly defined using the size oftranslation table directive.

In some exemplary embodiments, the target processor that is to be testedusing the test template may have a single thread architecture, may beconfigured to execute a single processing entity, or the like.Additionally or alternatively, the target processor may be configured toexecute a plurality of processing entities. In some exemplaryembodiments, the test template may be configured to implement a falsesharing scenario, in which the same physical address is accessed, e.g.,concurrently, by different processing entities, but to differentportions thereof, such as each accessing a different offset from thesame physical address. In some exemplary embodiments, each processingentity may access disjoint memory regions. As an example, a plurality ofprocessing entities may each perform a scenario of repeatedly performingload/store operation and changing context, concurrently on the same setof physical addresses—each of which utilizing a different offset fromthe same base physical address. In such an embodiment, the sametranslation tables may be reused for different processing entities. Forexample, three different processing entities may use the same twotranslation tables to verify the operation of the MMU separately. Thefirst processing entity may access the physical addresses with offset ofzero (0), the second processing entity may access the physical addresseswith an offset of 512, and the third processing entity may access thephysical addresses with an offset of 1024. Assuming each access does notexceed 512 memory blocks, each processing entity may not interfere withthe operation of the other. It is noted that in such an embodiment, areduced number of translation tables is generated and the size of themodified test template may be, accordingly, relatively small, incomparison to the naïve solution utilizing six (6) different translationtables—2 for each processing entity. It is noted that in someembodiments, the same physical addresses may be reused regardless ofwhether or not the same virtual addresses are being used.

In some exemplary embodiments, the test template may be configured toimplement true sharing test scenarios, such as a shared counter,sequential load consistency, or the like. Random context changes may beintroduced and added into the test template to verify the operation ofthe MMU, without adversely affecting the effectiveness of the truesharing test scenario for discovering bugs, as the premise of the truesharing test scenarios may not be broken by such addition.

On Step 120, a modified test template may be generated. The modifiedtest template may comprise additional directives, may replace existingdirectives, may remove directives, or the like. In some exemplaryembodiments, the test template may indicate that multiple contexts areto be utilized, such as a first context and a second context. In oneexample, the test template may comprise a directive that is configuredto cause a context change. Additionally, or alternatively, the testtemplate may comprise a directive that is configured to cause executionof different portions thereof in different processing entities, and as aresult, in potentially different contexts. Other scenarios may beimplemented by the verification engineer defining the test template inorder to verify the MMU, the usage of translation tables, or the like.

On Step 124, a first translation table may be determined. The firsttranslation table may define a first mapping from a first set of virtualaddress to a first set of physical addresses. In some exemplaryembodiments, the first translation table may be associated with a firstcontext. In some exemplary embodiments, the first translation table maybe embedded into the modified test template, to be utilized during thegeneration of tests based thereon. In some exemplary embodiments, thetranslation table may be external to the modified test template, and itsvalues may be utilized by the generated tests. For the clarity ofdisclosure, and without limiting the disclosed subject matter to aspecific embodiment, the disclosure herein refers to the table as being“embedded” in the modified test template, even if the table may betechnically separate therefrom.

On Step 128, a second translation table may be determined. The secondtranslation table may define a second mapping from a second set ofvirtual address to a second set of physical addresses. In some exemplaryembodiments, the second translation table may be associated with asecond context. In some exemplary embodiments, the second translationtable may be embedded into the modified test template.

In some exemplary embodiments, a number of contexts directive may definea number of translation tables to be included in the modified testtemplate. In case the number of translation tables is larger than two,additional translation tables may be determined. The sizes of thetranslation tables may be the size defined by a size of translationtable directive.

In some exemplary embodiments, the first translation table and thesecond translation table may overlap. The first and second translationtables may overlap in the set of virtual address. At least one virtualaddress comprised by the first set of virtual addresses may be comprisedby the second set of virtual addresses. Additionally, or alternatively,the first and second translation tables may overlap in the physicaladdresses. The first set of physical address may comprise a physicaladdress. The physical address may be comprised by the second set ofphysical addresses.

In some exemplary embodiments, such overlapping may be useful forverifying the operation of the target processor, when performing contextchanges. Through the use of different translation tables, the samephysical addresses may be accessible, such as using different virtualaddresses, and vice versa. As an example, the target processor may beinstructed, in a first context, to access a first virtual address thatis mapped in the first context to a physical address. The targetprocessor may then be instructed, in a second context, to access asecond virtual address that is mapped in the second context to the samephysical address. As the target processor should access the samephysical address, the content in the accessed memory may be verified tobe the same in both contexts. As yet another example, the targetprocessor may be instructed, in a first context, to access a virtualaddress that is mapped in the first context to a first physical address.The target processor may then be instructed, in a second context, toaccess the same virtual address. As the same virtual address is mappedin the second context to a different physical address, it may beverified that a different content is accessed.

In some exemplary embodiments, the first set of virtual addresses andthe second set virtual addresses may be identical. Each virtual addresscomprised by the first set of virtual addresses may be comprised by thesecond set of virtual addresses. Additionally or alternatively, eachvirtual address comprised by the second set of virtual addresses may becomprised by the first set of virtual addresses.

Additionally or alternatively, the first set of physical addresses andthe second of virtual addresses may be identical. Each physical addresscomprised by the first set of physical addresses may be comprised by thesecond set of physical addresses. Additionally or alternatively, eachphysical address comprised by the second set of physical addresses maybe comprised by the first set of physical addresses.

In some cases, in order to limit the number of addresses that areaccessed during execution of a test—virtual or physical—the translationtables may be permutations of each other.

In some exemplary embodiments, a test may be generated based on a testtemplate configured to test a false sharing scenario. The test may beconfigured to access a first offset of a physical address in a firstcontext by utilizing a first translation table. Additionally oralternatively, the test may be configured to access a second offset ofthe physical address in a second address by utilizing a secondtranslation table. In some exemplary embodiments, the first offset maybe comprised by the first translation table and the second offset may becomprised by the second translation table.

On Step 130, an executable may be generated. The executable may be anexerciser program that is configured to be executed by the targetprocessor, such as provided using the instruction set of the targetprocessor. In some exemplary embodiments, the executable may include themodified test template. The executable may be configured, when executedto generate tests based on the modified test template, execute the test,and validate their outcome. In some exemplary embodiments, theexecutable may be utilized in for post-silicon verification, when thetarget processor is fabricated. Additionally or alternatively, theexecutable may be utilized in pre-silicon verification, such as byloading the executable onto an acceleration platform that is configuredto provide the functionality of the target processor.

On Step 140, the executable may be loaded to the target processor. Insome exemplary embodiments, the executable may be transferred from astorage in which it was originally generated, such as an off-platformcomputer, to the memory of the target processor, enabling the executionthereof by the target processor. The loading may be performedautomatically, manually, semi-automatically, or the like.

On Step 150, the executable may be executed by the target processor. Insome exemplary embodiments, the executable may be an exerciserconfigured to verify the target processor by generating tests that areinline with the test template, execute such tests and verify theiroutcome. In some exemplary embodiments, the generation may be performedusing the modified test template, thereby utilizing previouscomputations, such as computations performed off-platform, using areliable computing system, using cheaper and more available resources,or the like. In some exemplary embodiments, the exerciser may beconfigured to repeatedly generate a test, execute the generated test andvalidate its outcome.

In some exemplary embodiments, the validation may be based on an outcomeof a test being different than the desired outcome of the test. In someexemplary embodiments, generating the test may comprise determining thedesired outcome of the test. The outcome of a test may be an outputvalue, occurrence or lack thereof of an event, such as a page fault, orthe like.

Referring now to FIG. 1B showing a flowchart diagram of a method, inaccordance with some exemplary embodiments of the disclosed subjectmatter.

FIG. 1B may illustrate utilizing the disclosed subject matter in apre-silicon environment. In some exemplary embodiments, the pre-siliconenvironment may comprise a simulator, such as a Hardware DescriptionLanguage (HDL) simulator, of the target processor, an emulation of thetarget processor, or the like.

On Step 160, tests may be generated based on the modified test template.In some exemplary embodiments, the generated tests may comprise aplurality of instructions based on directives comprised by the modifiedtest template. In some exemplary embodiments, Step 160 may be performedby a device different than the target processor. It is noted that insome exemplary embodiments, Steps 120 and 160 may be combined andperformed by a single module, such as a test generator.

The test generator may define a Constraint Satisfaction Problem (CSP)based on the set of constraints that are determined based on thedirectives of the modified test template. The CSP may define a set ofvariables, a set of constraints thereon, and a set of domain for eachvariables. The test generator may utilize a CSP solver to provide asolution to the CSP and utilize the solution to generate a test thatcomplies with the directives of the test template. In some exemplaryembodiments, a plurality of alternative solutions to the CSP may beprovided, and accordingly, a plurality of alternative tests may begenerated. It is noted that in some embodiments, the tests may begenerated without the use of a CSP solver. In some exemplaryembodiments, generating the simulation may comprise determining desiredoutcomes for each test. An outcome of a test may be an output value,occurrence or lack thereof of an event, adhering to an assertion, or thelike.

On Step 170, an execution of the tests may be simulated. Simulating thetests may comprised executing each test on a computerized devicesimulating the target processor. The simulation may comprise simulatingthe functionality of the target processor's design, including theoperation of the MMU, the utilization of the translation tables, theTBL, the cache mechanism, or the like. For each test, an outcome may beobtained.

It is noted that in some embodiments, Steps 160 and 170 may be performedrepeatedly and iteratively, such as generating a test and simulating itsexecution.

In some exemplary embodiments, based on the simulation performed on Step170, it may be determined if the target processor functions properly.Appropriate output indicating the results of the verification may beprovided to a user, such as the verification engineer.

Referring now to FIG. 2 showing a block diagram of an apparatus, inaccordance with some exemplary embodiments of the disclosed subjectmatter. The apparatus of FIG. 2 may illustrate an apparatus of thedisclosed subject matter in a pre-silicon environment.

In some exemplary embodiments, Apparatus 200 may comprise one or moreProcessor(s) 202. Processor 202 may be a Central Processing Unit (CPU),a microprocessor, an electronic circuit, an Integrated Circuit (IC) orthe like. Processor 202 may be utilized to perform computations requiredby Apparatus 200 or any of its subcomponents.

In some exemplary embodiments, Processor 202 may be of a different modelthan the target processor, of a different brand than the targetprocessor, have a different architecture than the target processor, orthe like. Additionally, or alternatively, Processor 202 may be thetarget processor.

In some exemplary embodiments of the disclosed subject matter, Apparatus200 may comprise an Input/Output (I/O) Module 205. I/O Module 205 may beutilized to provide an output to and receive input such as, for exampleobtain a test template from an external database, save outcomes of testssimulation to an external database, display results to a user, or thelike.

In some exemplary embodiments, Apparatus 200 may comprise Memory 207.Memory 207 may be a hard disk drive, a Flash disk, a Random AccessMemory (RAM), a memory chip, or the like. In some exemplary embodiments,Memory 207 may retain program code operative to cause Processor 202 toperform acts associated with any of the subcomponents of Apparatus 200.Memory 207 may comprise one or more components as detailed below,implemented as executables, libraries, static libraries, functions, orany other executable components.

In some exemplary embodiments, Test Template Obtainer 220 may beconfigured to obtain a test template. The test template may be similarto the test template that is obtained in FIG. 1A.

In some exemplary embodiments, Test Template Modifier 230 may beconfigured to modify a test template in accordance with the disclosedsubject matter. It is noted, however, that in some embodiments, thetemplate may need not be explicitly modified and a test may be generatedbased thereon directly. However, for the simplicity of disclosure, theembodiment is illustrated using a two-module implementation.

In some exemplary embodiments, Test Template Modifier 230 may beconfigured to obtain directives from the test template, such as a numberof contexts directive, a size of translation table directive, or thelike. In some exemplary embodiments, Test Template Modifier 230 maydetermine translation tables that meet the definitions provided usingsuch directives. Additionally or alternatively, Test Template Modifier230 may add into the modified test the translation tables, and enforcethe template to utilize the translation tables in different contexts. Asan example, a first translation table may be utilized when instructionsthat are generated based on a first set of directives are executed,while a second translation table may be utilized when instructions thatare generated based on a second set of directives are executed.

In some exemplary embodiments, the modified test template may beretained in Memory 207. The modified test template may be provided toTest Generator 240 directly, without using an intermediate file.

In some exemplary embodiments, Tests Generator 240 may be configured togenerate tests based on the modified test template as described in FIG.1B, Step 160.

In some exemplary embodiments, Tests Execution Simulator 250 may beconfigured to simulate execution of tests by the target processor asdescribed in FIG. 1B, Step 170.

Referring now to FIG. 3A showing a schematic illustration of anexemplary mapping, in accordance with some exemplary embodiments of thedisclosed subject matter.

FIG. 3A may illustrate two permutations of translation tables betweenidentical sets of addresses: Virtual Addresses Set 310 and PhysicalAddresses Set 312. A first translation table is illustrated using fullarrows (e.g., 305 a), while a second translation table is illustrated bybroken arrows (e.g., 305 b). The first translation table may VirtualAddress 301 (VA1) to Physical Address 302 (PA1) (e.g., as illustrated byArrow 305 a). The same translation table also maps Virtual Address 303(VA2) to Physical Address 304 (PA4). However, the second translationtable maps Virtual Address 301 (VA1) to Physical Address 304 (PA2)(e.g., as illustrated by Arrow 305 b) and Virtual Address 303 (VA2) toPhysical Address 302 (PA1) (e.g., as illustrated by Arrow 307 a).

As can be appreciated, although both translation tables shared the samesets of virtual and physical addresses, each virtual address is mappedto a different physical address in each translation table, and eachphysical address is likewise mapped to a different virtual address ineach translation table. FIGS. 3B and 3C illustrate in a separate mannerthe first and second translation tables that are a permutation of eachother.

It may be noted that in some exemplary embodiments, the translationtables may overlap but not be a permutation of each other. Additionallyor alternatively, other relations, beside a permutation, may existsbetween the translation tables.

Referring now to FIG. 4, showing an illustration of a computerizedenvironments in accordance with some exemplary embodiments of thedisclosed subject matter. FIG. 4 may illustrate a post-siliconverification scenario.

An Exerciser Image Builder 420 may be configured to generate anExerciser Image 430. Exerciser Image Builder 420 may be a computerizedtool, such as implemented in hardware, software, a combination thereof,or the like. Exerciser Image Builder 420 may be configured to takedifferent inputs as data which based thereon Exerciser Image 420 may bebuilt.

In some exemplary embodiments, Architectural Model 402 may be providedas input, and portions thereof may be inserted to a Data Section 435 ofExerciser Image 430. Architectural model 402 may be utilized byExerciser Image 420 to generate test cases that invoke differentarchitectural aspects of the target device. Additionally oralternatively, System Topology and Configuration 404 may be provided asinput and portions thereof may be retained in Data Section 435. Topologyand configuration information may be utilized by Exerciser Image 430 togenerate test cases that test different aspects of the topology andconfiguration of the target device. Additionally or alternatively, BaseCode 406 may be provided as input. Base Code 406 may comprise programinstructions to be added to Exerciser Image 430. In some exemplaryembodiments, Exerciser Image 430 may be based on Base Code 406. Theprogram instructions may be operative to performgeneration-execution-checking loop (442, 444, 446). Additionally oralternatively, Base Code 406 may comprise program instruction providingOS services, such as OS Services 450. Additionally or alternatively,Test Template 410 or a plurality of similar templates may be provided asinput and may be retained in Data Section 435 to allow Exerciser Image430 to perform generation based upon abstract outline of operationsprovided by the Test Template 410. In some exemplary embodiments, TestTemplate 410 may be modified and a Modified Test Template 432 may beincluded in Data Section 435.

In some exemplary embodiments, Exerciser Image Builder 420 may beconfigured to manipulate any input provided to it before storingcorresponding data in Data Section 435. In one embodiment, ExerciserImage Builder 430 may strip down information that is not needed by theExerciser Image 420 and/or may pre-calculate information to reduceamount of data to be retained in the binary image.

In some exemplary embodiments, Exerciser Image Builder 420 maypre-calculate Translation Tables 434, such as based on directives inTest Template 410.

In some exemplary embodiments, Exerciser Image 430 may comprise DataSection 435 that may retain useful information such as test templatebased upon generation may be performed (e.g., 410 or 432), TranslationTables 434, topology and configuration information, architectural modelinformation or the like.

In some exemplary embodiments, Exerciser Image 430 may comprise programinstructions designed to cause the Target Processor 460 to repeatedlyperform generation of a test case (442), execution of the test case(444) and checking results of executing the test case (446). Checkingoperations (446) may be based on consistency checks. As an example, thesame test case may be executed a plurality of times, and the results maybe compared for consistency.

Exerciser Image 430 may comprise OS Services 450, an Additional SoftwareLayer (ASL), useful for providing the Exerciser Image 430 withfunctionality that is not provided by a bare-metal product, such asTarget Processor 460. OS Services 450 may provide functionalities suchas interrupt handlers, program counter or instruction pointermanipulation, software-based context switch, or the like.

Exerciser Image 430 may be loaded onto a platform, such as TargetProcessor 460. Exerciser Image 430 may be loaded by loading the binaryto a memory unit of Target Processor 460. Exerciser Image 430 may beexecuted by the Target Processor 460 and may cause Target Processor 460to generate tests, execute and check their execution results, therebyenabling verification of the Target Processor 460.

Exerciser Image 430 may be alternatively loaded to an AccelerationPlatform 470 which simulates, in a hardware-based manner, TargetProcessor 460. Acceleration Platform 470 may be configured to simulateoperation of a circuit design based upon an HDL definition thereof(475), such as the HDL from which Target Processor 460 is fabricated.

An Embodiment

In some exemplary embodiments, a single shared physical address may beutilized to verify operation of a target processor. In a firsttranslation table, a first virtual address is mapped to a physicaladdress and a second virtual address is not mapped, and as a result, ifaccessed, a page fault will occur. In a second translation table, thesecond virtual address is mapped to the physical address, while thefirst virtual address is not mapped. This can be illustrated using thefollowing formula:

${\begin{pmatrix}{VA}_{1} \\{VA}_{2}\end{pmatrix}\underset{{ctx}t{.1}}{\rightarrow}\begin{pmatrix}{PA}_{1} \\{{page}\mspace{14mu}{fault}}\end{pmatrix}},{\begin{pmatrix}{VA}_{1} \\{VA}_{2}\end{pmatrix}\underset{{ctxt}{.2}}{\rightarrow}\begin{pmatrix}{{page}\mspace{14mu}{fault}} \\{PA}_{1}\end{pmatrix}}$

A test template may be configured to change contexts and attemptaccessing the same PA in different contexts to ensure that the correcttranslation tables are used. For example, VA1 may be accessed in thefirst context and VA2 may be accessed in the second context, e.g., forstoring, loading, or the like. If a page fault occurs, it may beindicative of a bug in the MMU, as the address was incorrectlytranslated.

An Embodiment

A data-side scenario may be utilized to test memory access operations ofthe target processor. The test template may define that two contexts areto be used (e.g., using a context number directive), and that eachtranslation table comprises four virtual addresses (e.g., using a sizeof translation table directive) and four physical addresses (e.g., usinga second size of translation table directive). The test template maydefine a scenario where, repeatedly, a memory access instruction isperformed and a context is changed. The modified test template may bedefined using the following directives:VA_x=Rand(VA1,VA2,VA3,VA4)Load/Store myOffset (VA_x)Context changeLoad/Store myOffset (VA_x)Context changeLoad/Store myOffset (VA_x)

As can be appreciated, the test template indicates that the VA_xvariable is randomly selected when a test is generated, as one of VA1,VA2, VA3, VA4, which are the four virtual addresses used by bothtranslation tables that were determined for the modified test template.

The generated test may include instructions that perform the scenario ofperforming a memory access operation (e.g., load instruction, or storeinstruction) that access the selected virtual address (VA_x), andchanging the context. The access may be performed in any offset from thebase address of VA_x. In some exemplary embodiments, myOffset functionmay define a constraint on the offset, such as providing a differentoffset for different processing entities thereby enabling utilization offalse sharing to verify the different processing entities using the sametranslation tables. It is noted that in each context the physicaladdress of VA_x is different, due to the usage of the differenttranslation tables that share the value of VA_x but map it to adifferent physical address.

An Embodiment

An instruction-side scenario may be utilized to test control flowoperation of the target processor. The test template may define that twocontexts are to be used (e.g., using a context number directive), andthat each translation table comprises four virtual addresses (e.g.,using a size of translation table directive) and four physical addresses(e.g., using a second size of translation table directive). The testtemplate may define a scenario where instructions are loaded into thephysical addresses pointed to be the virtual address, and are executeddue to a branching instruction that is performed to the virtual address.A first set of instructions may be located starting at the physicaladdress that the first mapping points to. These instructions maycomprise an instruction causing a context change, that is followed by aninstruction that indicates an error, if executed. After the contextchanges, and as the program counter is not modified and the valuethereof is based on an offset from the virtual address, an instructionlocated at the appropriate offset from a different physical address, thephysical address that the same virtual address is mapped to by thesecond mapping, may be executed. In case of a bug in the targetprocessor, instead of executing the correct instruction, the instructionthat indicates the error may be executed.

As an example, the modified test template may be defined using thefollowing directives:VA_x=Rand(VA1,VA2,VA3,VA4)Store in VA_x of a first context, instructions:

-   -   Non-PC-affecting instruction    -   Context change to a second context    -   Assert (false)        Store in an offset of three instructions from VA_x of the second        context,    -   Random instruction        Branch to VA_x

As can be appreciated, a test in accordance with such test templatebranches, in a first context, to a randomly selected virtual address,and executes two instructions that are located in such location—a randominstruction that does not affect the program counter (non-PC-affectinginstruction), and an instruction to change the context. If the MMUoperates correctly, following the context change, the “assert (false)”instruction is not executed, but rather the random instruction.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

What is claimed is:
 1. A method comprising: obtaining a test template,wherein the test template is utilized for testing a target processor,wherein the test template comprises one or more directives, at least oneof which represents a plurality of alternative sets of one or moreinstructions executable by the target processor, wherein the targetprocessor is configured to utilize a different translation table totranslate a virtual address to a physical address in different contexts,wherein the test template comprises: a first set of directives to beexecuted in a first context; a second set of directives to be executedin a second context; based on the test template, generating a modifiedtest template, wherein said generating comprises: determining a firsttranslation table to be used in the first context by the targetprocessor, wherein the first translation table comprises a mapping of afirst set of virtual addresses to a first set of physical addresses,whereby during execution of instructions generated based on the firstset of directives, memory address translations are handled using thefirst translation table; determining a second translation table to beused in the second context by the target processor, wherein the secondtranslation table comprises a mapping of a second set of virtualaddresses to a second set of physical addresses, whereby duringexecution of instructions generated based on the second set ofdirectives, memory address translations are handled using the secondtranslation table, wherein the first translation table and the secondtranslation table overlap.
 2. The method of claim 1, wherein the firsttranslation table and the second translation table overlap in the setsof virtual addresses, wherein the first set of virtual addressescomprises at least one virtual address, wherein the second set ofvirtual addresses comprises the at least one virtual address.
 3. Themethod of claim 1, wherein the first translation table and the secondtranslation table overlap in the sets of physical addresses, wherein thefirst set of physical addresses comprises at least one physical address,wherein the second set of physical addresses comprises the at least onephysical address.
 4. The method of claim 1, wherein the first set ofvirtual addresses and the second set of virtual addresses are identical,wherein the first set of physical addresses and the second set ofphysical addresses are identical, wherein for each virtual address ofthe first set of virtual addresses, the mapping of the first translationtable provides a different physical address than the mapping of thesecond translation table.
 5. The method of claim 1, wherein the one ormore directives of the test template comprise: a number of contextsdirective, wherein the number of contexts directive defines a number oftranslation tables to be utilized during execution of a test inaccordance with the test template, wherein each translation table isassociated with a different context; and a size of translation tabledirective, wherein the size of translation table directive defines anumber of virtual addresses or a number of physical addresses to beincluded in each translation table.
 6. The method of claim 1, whereinthe overlap between the first translation table and the secondtranslation table is in a physical address, whereby the physical addressis comprised by both the first set of physical addresses and the secondset of physical addresses; and wherein a test generated based on themodified test template is configured to access a first offset from thephysical address in the first context and to access a second offset fromthe physical address in the second context, whereby the test testing afalse sharing scenario between two disjoint memory ranges.
 7. The methodof claim 1, wherein during execution of instructions generated based onthe first set of directives, the target processor is configured toperform a first memory access operation based on the first translationtable; and wherein during execution of instructions generated based onthe second set of directives, the target processor is configured toperform a second memory access operation based on the second translationtable; and wherein each of the first memory access operation and thesecond memory access operation is one of a memory load operation and amemory store operation; whereby a test generated based on the modifiedtest template is configured to test utilization of translation tables inmemory access operations.
 8. The method of claim 1, wherein the overlapbetween the first translation table and the second translation table isin a virtual address; wherein during execution of instructions generatedbased on the first set of directives: the target processor is configuredto perform a branching instruction to the virtual address, wherebycausing a program counter to be assigned the virtual address; and thetarget processor is configured to perform a context change while theprogram counter is assigned a value that is defined based on an offsetfrom the virtual address, whereby causing execution of instructionsgenerated based on the second set of directives; wherein duringexecution of the instructions generated based on the second set ofdirectives, a value of the program counter is based on the offset fromthe virtual address; whereby a test generated based on the modified testtemplate is configured to test utilization of translation tables incontrol flow operation of the target processor.
 9. The method of claim 1further comprises: generating tests based on the test template; andsimulating an execution of the generated tests using a simulatorconfigured to simulate operation of the target processor.
 10. The methodof claim 1 further comprises: generating an executable that isconfigured to be executed on the target processor, wherein theexecutable is configured to generate tests based on the modified testtemplate, execute the tests and determine desired outcomes of the tests;loading the executable to the target processor; and executing theexecutable by the target processor, whereby the tests are generated andexecuted.
 11. A computer program product comprising a non-transitorycomputer readable storage medium retaining program instructions, whichprogram instructions when read by a processor, cause the processor toperform: obtaining a test template, wherein the test template isutilized for testing a target processor, wherein the test templatecomprises one or more directives, at least one of which represents aplurality of alternative sets of one or more instructions executable bythe target processor, wherein the target processor is configured toutilize a different translation table to translate a virtual address toa physical address in different contexts, wherein the test templatecomprises: a first set of directives to be executed in a first context;a second set of directives to be executed in a second context; based onthe test template, generating a modified test template, wherein saidgenerating comprises: determining a first translation table to be usedin the first context by the target processor, wherein the firsttranslation table comprises a mapping of a first set of virtualaddresses to a first set of physical addresses, whereby during executionof instructions generated based on the first set of directives, memoryaddress translations are handled using the first translation table;determining a second translation table to be used in the second contextby the target processor, wherein the second translation table comprisesa mapping of a second set of virtual addresses to a second set ofphysical addresses, whereby during execution of instructions generatedbased on the second set of directives, memory address translations arehandled using the second translation table, wherein the firsttranslation table and the second translation table overlap.
 12. Thecomputer program product of claim 11, wherein the first translationtable and the second translation table overlap in the sets of virtualaddresses, wherein the first set of virtual addresses comprises at leastone virtual address, wherein the second set of virtual addressescomprises the at least one virtual address.
 13. The computer programproduct of claim 11, wherein the first translation table and the secondtranslation table overlap in the sets of physical addresses, wherein thefirst set of physical addresses comprises at least one physical address,wherein the second set of physical addresses comprises the at least onephysical address.
 14. The computer program product of claim 11, whereinthe first set of virtual addresses and the second set of virtualaddresses are identical, wherein the first set of physical addresses andthe second set of physical addresses are identical, wherein for eachvirtual address of the first set of virtual addresses, the mapping ofthe first translation table provides a different physical address thanthe mapping of the second translation table.
 15. The computer programproduct of claim 11, wherein the one or more directives of the testtemplate comprise: a number of contexts directive, wherein the number ofcontexts directive defines a number of translation tables to be utilizedduring execution of a test in accordance with the test template, whereineach translation table is associated with a different context; and asize of translation table directive, wherein the size of translationtable directive defines a number of virtual addresses or a number ofphysical addresses to be included in each translation table.
 16. Thecomputer program product of claim 11, wherein the overlap between thefirst translation table and the second translation table is in aphysical address, whereby the physical address is comprised by both thefirst set of physical addresses and the second set of physicaladdresses; and wherein a test generated based on the modified testtemplate is configured to access a first offset from the physicaladdress in the first context and to access a second offset from thephysical address in the second context, whereby the test testing a falsesharing scenario between two disjoint memory ranges.
 17. The computerprogram product of claim 11, wherein during execution of instructionsgenerated based on the first set of directives, the target processor isconfigured to perform a first memory access operation based on the firsttranslation table; and wherein during execution of instructionsgenerated based on the second set of directives, the target processor isconfigured to perform a second memory access operation based on thesecond translation table; and wherein each of the first memory accessoperation and the second memory access operation is one of a memory loadoperation and a memory store operation; whereby a test generated basedon the modified test template is configured to test utilization oftranslation tables in memory access operations.
 18. The computer programproduct of claim 11, wherein the overlap between the first translationtable and the second translation table is in a virtual address; whereinduring execution of instructions generated based on the first set ofdirectives: the target processor is configured to perform a branchinginstruction to the virtual address, whereby causing a program counter tobe assigned the virtual address; and the target processor is configuredto perform a context change while the program counter is assigned avalue that is defined based on an offset from the virtual address,whereby causing execution of instructions generated based on the secondset of directives; wherein during execution of the instructionsgenerated based on the second set of directives, a value of the programcounter is based on the offset from the virtual address; whereby a testgenerated based on the modified test template is configured to testutilization of translation tables in control flow operation of thetarget processor.
 19. The computer program product of claim 11 furthercomprises: generating an executable that is configured to be executed onthe target processor, wherein the executable is configured to generatetests based on the modified test template, execute the tests anddetermine desired outcomes of the tests; loading the executable to thetarget processor; and executing the executable by the target processor,whereby the tests are generated and executed.
 20. A target processorthat is adapted to perform the steps of: obtaining a test template,wherein the test template is utilized for testing the target processor,wherein the test template comprises one or more directives, at least oneof which represents a plurality of alternative sets of one or moreinstructions executable by the target processor, wherein the targetprocessor is configured to utilize a different translation table totranslate a virtual address to a physical address in different contexts,wherein the test template comprises: a first set of directives to beexecuted in a first context; a second set of directives to be executedin a second context; based on the test template, generating a modifiedtest template, wherein said generating comprises: determining a firsttranslation table to be used in the first context by the targetprocessor, wherein the first translation table comprises a mapping of afirst set of virtual addresses to a first set of physical addresses,whereby during execution of instructions generated based on the firstset of directives, memory address translations are handled using thefirst translation table; determining a second translation table to beused in the second context by the target processor, wherein the secondtranslation table comprises a mapping of a second set of virtualaddresses to a second set of physical addresses, whereby duringexecution of instructions generated based on the second set ofdirectives, memory address translations are handled using the secondtranslation table, wherein the first translation table and the secondtranslation table overlap.